local t = Def.ActorFrame{};

for pn in ivalues(GAMESTATE:GetHumanPlayers()) do

	local img = "/"..THEME:GetCurrentThemeDirectory().."Graphics/cutin/"..MBSTATE:GetCharacter(pn).." (doubleres).png";
	
	if FILEMAN:DoesFileExist(img) then
		t[#t+1] = LoadActor(img)..{
			InitCommand=cmd(vertalign,bottom;xy,0,SCREEN_BOTTOM;zoom,1.25;fadetop,.5;diffusealpha,0);
			OnCommand=function(self)
				if pn == PLAYER_2 then
					self:rotationy(180):x(SCREEN_WIDTH);
				end;
				--self:queuecommand("Animate")
			end;
			AnimateCommand=function(self)
				if pn == PLAYER_1 then
					self:x(0):linear(.5):diffusealpha(1):x(66):linear(.5):x(132):linear(.5):x(198):diffusealpha(0)
				else
					self:x(SCREEN_WIDTH):linear(.5):diffusealpha(1):x(SCREEN_WIDTH-66):linear(.5):x(SCREEN_WIDTH-132):linear(.5):x(SCREEN_WIDTH-198):diffusealpha(0)
				end;
			end;
			ComboChangedMessageCommand=function(self, params)
				if params.Player ~= pn then return end
				local CurCombo = params.PlayerStageStats:GetCurrentCombo()
				if CurCombo % 50 == 0 and CurCombo >= 50 then
					--SCREENMAN:SystemMessage(CurCombo)
					self:stoptweening():queuecommand("Animate")
				end;
			end;
		};
	else
		SCREENMAN:SystemMessage("Missing "..img);
	end;

end;

return t;